﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="scripts/jquery-1.8.1.min.js"></script>
    <script src="scripts/bingo.js"></script>
</head>
<body>
    <div id="testView" bg-action="action1">
        <!--<div bg-if="isOk | eq:'1'"><span>你选择了 "真"</span></div>
        <div bg-if="isOk | neq:'1'"><span>你选择了 "假"</span></div>-->
        <div bg-if="isOk2"><span>你选择了 "真"1</span></div>
        <!--<div bg-if="isOk2 | not"><span>你选择了 "假"1</span></div>-->
        <div bg-text="isOk2"></div>
        <div bg-html="isOk2"></div>
        <select bg-model="isOk">
            <option value="1">真</option>
            <option value="0">假</option>
        </select>
    </div>
    <script type="text/javascript">
        var action1 = bingo.action(function ($view, $node, $var, $subs) {
            $view.isOk = '1';

            $view.isOk2 = $var(false);

            $subs('isOk', function (value) {
                console.log('isOk', value);
                $view.isOk2(value == '1');
            });

        });
    </script>
</body>
</html>
